/*************************************************************************
	> File Name: P8597.cpp
	> Author: yufangze
	> Mail: 2224590123@qq.com
	> Created Time: 2025-02-13 15:52:10
 ************************************************************************/
#include <iostream>
using namespace std;

int main() {
    string a, b;
    int cnt = 0;
    cin >> a >> b;
    for (int i = 0; i < a.size(); i++) {
        if (a[i] == b[i]) continue;
        cnt += 1;
        if (a[i] == '*') {
            a[i] = 'o';
            if (a[i + 1] == '*') {
                a[i + 1] = 'o';
            } else {
                a[i + 1] = '*';
            }
        } else {
            a[i] = '*';
            if (a[i + 1] == '*') {
                a[i + 1] = 'o';
            } else {
                a[i + 1] = '*';
            }
        }
    }
    cout << cnt << endl;
    return 0;
}
